[[Module theory MOC]]
# Free module
**Free modules** are the [[Free-forgetful adjunction|free objects]] in [[Category of left modules]]. #m/def/module
In essence it is a module with a **basis**, hence every [[vector space]] is a free module,
but one can form non-free modules over a ring that is not a [[Division ring]].
> [!info]+ Notation
> In these notes, we have two conventions for the free module over $R$ generated by a set $S$. The first is
> $$
> \begin{align*}
> R^{(S)} = \Span \{ \delta_{s} : s \in S \rangle \} \leq R^S
> \end{align*}
> $$
> where we think of elements as maps of finite support $S \to R$,
> and we identify $s \in S$ with $\delta_{s} : t \mapsto [s=t]$.
> The second is
> $$
> \begin{align*}
> R \langle x_{s} \rangle_{s \in S} = \Span \{ x_{s} : s \in S \}
> \end{align*}
> $$
> which allows for the explicit naming of the basis to be used.
By **basis** $\mathcal{B}$ for an $R$-module $V$, we mean an $R$-spanning set $\mathcal{B}$ such that each $v \in V$ is given by a _unique_ $R$-linear combination of $\mathcal{B}$ elements. ^basis
## Universal property
Let $R$ be a ring and $S$ be a set.
The **free module** is a pair consisting of an $R$-module $R^{(S)}$ and a function $\iota : S \to R^{(S)}$
such that given any $R$-module $M$ and function $f : S \to M$
there exists a unique [[module homomorphism]] $\bar{f} : R^{(S)} \to M$ such that the following diagram commutes
<p align="center"><img align="center" src="https://i.upmath.me/svg/%0A%5Cusetikzlibrary%7Bcalc%7D%0A%5Cusetikzlibrary%7Bdecorations.pathmorphing%7D%0A%5Ctikzset%7Bcurve%2F.style%3D%7Bsettings%3D%7B%231%7D%2Cto%20path%3D%7B(%5Ctikztostart)%0A%20%20%20%20..%20controls%20(%24(%5Ctikztostart)!%5Cpv%7Bpos%7D!(%5Ctikztotarget)!%5Cpv%7Bheight%7D!270%3A(%5Ctikztotarget)%24)%0A%20%20%20%20and%20(%24(%5Ctikztostart)!1-%5Cpv%7Bpos%7D!(%5Ctikztotarget)!%5Cpv%7Bheight%7D!270%3A(%5Ctikztotarget)%24)%0A%20%20%20%20..%20(%5Ctikztotarget)%5Ctikztonodes%7D%7D%2C%0A%20%20%20%20settings%2F.code%3D%7B%5Ctikzset%7Bquiver%2F.cd%2C%231%7D%0A%20%20%20%20%20%20%20%20%5Cdef%5Cpv%23%231%7B%5Cpgfkeysvalueof%7B%2Ftikz%2Fquiver%2F%23%231%7D%7D%7D%2C%0A%20%20%20%20quiver%2F.cd%2Cpos%2F.initial%3D0.35%2Cheight%2F.initial%3D0%7D%0A%25%20TikZ%20arrowhead%2Ftail%20styles.%0A%5Ctikzset%7Btail%20reversed%2F.code%3D%7B%5Cpgfsetarrowsstart%7Btikzcd%20to%7D%7D%7D%0A%5Ctikzset%7B2tail%2F.code%3D%7B%5Cpgfsetarrowsstart%7BImplies%5Breversed%5D%7D%7D%7D%0A%5Ctikzset%7B2tail%20reversed%2F.code%3D%7B%5Cpgfsetarrowsstart%7BImplies%7D%7D%7D%0A%25%20TikZ%20arrow%20styles.%0A%5Ctikzset%7Bno%20body%2F.style%3D%7B%2Ftikz%2Fdash%20pattern%3Don%200%20off%201mm%7D%7D%0A%25%20https%3A%2F%2Fq.uiver.app%2F%23q%3DWzAsMyxbMCwwLCJTIl0sWzIsMCwiUl57KFMpfSJdLFsyLDIsIk0iXSxbMCwxLCJcXGlvdGEiXSxbMCwyLCJmIiwyXSxbMSwyLCJcXGV4aXN0cyAhXFxiYXIgZiIsMSx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dXQ%3D%3D%0A%5Cbegin%7Btikzcd%7D%0A%09S%20%26%26%20%7BR%5E%7B(S)%7D%7D%20%5C%5C%0A%09%5C%5C%0A%09%26%26%20M%0A%09%5Carrow%5B%22%5Ciota%22%2C%20from%3D1-1%2C%20to%3D1-3%5D%0A%09%5Carrow%5B%22f%22'%2C%20from%3D1-1%2C%20to%3D3-3%5D%0A%09%5Carrow%5B%22%7B%5Cexists%20!%5Cbar%20f%7D%22%7Bdescription%7D%2C%20dashed%2C%20from%3D1-3%2C%20to%3D3-3%5D%0A%5Cend%7Btikzcd%7D%0A#invert" alt="https://q.uiver.app/#q=WzAsMyxbMCwwLCJTIl0sWzIsMCwiUl57KFMpfSJdLFsyLDIsIk0iXSxbMCwxLCJcXGlvdGEiXSxbMCwyLCJmIiwyXSxbMSwyLCJcXGV4aXN0cyAhXFxiYXIgZiIsMSx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dXQ==" /></p>
This has a unique extension to a [[functor]] such that
$$
\begin{align*}
\iota : 1 \Rightarrow R^{(-)}: \Set \to \Set
\end{align*}
$$
becomes a [[natural transformation]].
## Construction as maps
Let $S$ be a set and $R$ be a ring.
The free module $R^{(S)}$ is the set of [[Support of a map|maps of finite support]] $S \to R$ with addition and scaling induced by those of $R$, #m/def/module
i.e. for all $s \in S$
$$
\begin{align*}
(\alpha a + \beta b)(s) = \alpha a(s) + \beta b(s)
\end{align*}
$$
where we identify $s \in S$ with $\delta_{s} : t \mapsto [t=s]$ invoking an [[Iverson bracket]].
> [!check]- Proof of universal property
> Clearly $R^{(S)}$ as constructed is an $R$-module with basis $\{ \delta_{s} \}_{s \in S}$
> Now let $M$ be an $R$-module and $f : S \to M$ be a function.
> For a module homomorphism $\bar{f} : R^{(S)} \to M$ to make the diagram commute,
> we require that $\bar{f}(\delta_{s}) = f(s)$ for all $s \in S$,
> which fully specifies $\bar{f}$ so that for $a \in R^{(S)}$
> $$
> \begin{align*}
> \bar{f}(a) = \sum_{s \in S} f(s) a(s)
> \end{align*}
> $$
> as required. <span class="QED"/>
## Properties
- $R^{(S)}$ carries the additional structure of a coring, namely the [[Free R-comonoid]]
#
---
#state/tidy | #lang/en | #SemBr